package com.cy.test250502.net

import com.cy.cy2025.net.retrofit.RetrofitHelper
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

object TestInfoApiService {


    val service: TestInfoApi by lazy { RetrofitHelper.testInfoRetrofit.create(TestInfoApi::class.java) } 


    suspend fun testInfo(): String? = withContext(Dispatchers.IO){

        runCatching {
            service.getTestInfo().execute().body()?.string()
        }.getOrElse {
            it.message.toString()
        }

    }
}